<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<style type="text/css">
	.content {
		background-color: #9ACD32;
		height: 600px;
		border: 1px solid gray;
		width: 600px;
		margin: 100px auto;
		position: relative;
	}

	.inner {
		position: absolute;
		left: 50%;
		top:50%;
		/* 该属性的百分比是相对于自身的,分别表示 x,y,z轴 */
		transform: translate3d(-50%,-50%,0);
		background-color: #FF6945;
	}
</style>

<body>
	<div class="content">
		<div class="inner">
			sdv ssdv sd
			<br /> sdv ssdv sd
			<br /> sdv ssdv sd
			<br />
		</div>
	</div>
</body>

</html>
